package com.wc.bean;

import lombok.Data;

import java.io.Serializable;

@Data
public class ResponseMsg<T> implements Serializable {
    private static  final long serolVersionUID = 73024683801978723L;

    public static  final  Integer STATUS_SUCCES = 0;

    public  static final  Integer STATUS_FAIL = -1;

    private Integer status;

    private  String message;

    private T data;

    private  Integer total;

    public void success(String msg){
        this.message = msg;
        this.status = STATUS_SUCCES;
    }
    public void fail(String msg){
        this.message = msg;
        this.status = STATUS_FAIL;
    }

    public void setData(T data) {
        this.data = data;
    }
}
